import PageTools from './PageTools' // 通用工具栏
import Tree from './Tree'
import UploadExcel from './UploadExcel'
import UploadImg from './UploadImg/index.vue'
import ScreenFull from './ScreeFull/index.vue'
import Lang from './Lang/index.vue'
/**
 * 批量注册多个组件:
 * 1.把组件放到一个组件中
 * 2.循环注册所有组件
 */
const component = [PageTools, Tree, UploadExcel, UploadImg, ScreenFull, Lang]

// vue 插件写法: 声明一个对象,同时里面放一个install 方法(能达到vue构造函数)
// 必须给 注册的组件添加 name  Vue.component('PageTools', PageTools)
export default {
  install (Vue) {
    component.forEach(cp => {
      Vue.component(cp.name, cp)
    })
  }
}
